#include <bits/stdc++.h>
using namespace std;
const int N=5e5+50;
int a[N],n,buc[N],tot;
long long cnt;
struct node{
    int n;
    int k;
}s[N];

int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        buc[a[i]]++;
    }
    for(int i=0;i<=100050;i++){
        if(buc[i]){
            s[++tot].n=buc[i];
            s[tot].k=i;
        }
    }
    cnt=s[1].n;
    for(int i=2;i<=tot;i++){
        cnt-=s[i].n;
        if(cnt<0) cnt=0;
        cnt+=s[i].n;
    }
    cout<<cnt;


    return 0;
}
